#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
int main() {
	int N = 0;
	scanf("%d", &N);
	getchar();
	char* arr[N];
	char str1[] = {"Ban_smoking"};
	char str2[] = { "No_smoking" };
	for (int i = 0; i < N; i++) {
		scanf("%s", &str);
		//char* ret = strstr(str, str1);
		char* result = str_replace(str, str1, str2);
		arr[N] = result;
	}
	for (int i = 0; i < N; i++) {
		printf("%s", arr[i]);
		printf("\n");
	}
	return 0;
}